package shape;

import java.awt.geom.Point2D;

import shape.selector.Selector;

public class ModelCircle extends Circle implements ModelShape {

	private Selector selector;

	public ModelCircle() {
		super();
	}

	public ModelCircle(Point2D position, double radius) {
		super(position, radius);
	}

	@Override
	public boolean checkContains(Point2D point) {
		return this.selector.checkSelected(point);
	}

	@Override
	public void setSelector(Selector selector) {
		this.selector = selector;
		this.selector.setTarget(this);
	}

	@Override
	public Rectangle getBoundingBox() {
		return new Rectangle(new Point2D.Double(super.getPosition().getX(), super.getPosition().getX()), super.radius * 2, super.radius * 2);
	}
}
